<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/displaytag.tld" prefix="display"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>


<link href="<%= request.getContextPath() + "/css/bloques.css" %>" rel="stylesheet" type="text/css">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Activar Subprogramas</title>
    
    <script language="javascript">
      function fboton(){
      document.frmActivarSubprograma.activar.disabled = false;
      }
    </script>
  </head>
  <body>
    <P></P>
    <P></P>
    <table cellspacing="2" cellpadding="1" border="0" width="80%" align="center">
      <tr>
        <td>
          <DIV align="center" class="titulosenblanco">ACTIVAR BENEFICIOS</DIV>
        </td>
      </tr>
    </table>
    <P align="center"></P>
    <form name="frmActivarSubprograma" action="<%=request.getContextPath()+"/admin/tile/ActivarCorrectaSubprograma.jsp"%>">
   
        <table  cellspacing="3" cellpadding="2" border="0" width="90%" align="center">
            <tr>
            <td>
            <logic:notPresent scope="request" name="subprogramas">
                <DIV align="center"><%=request.getAttribute("msg")%></DIV>
            </logic:notPresent>
            <logic:present scope="request" name="subprogramas"> 
            <%
            int i = 0;
            int cont = 0;
            %>
            
            <display:table name="requestScope.subprogramas" class="bordesTable"  id="subpro" cellpadding="3" cellspacing="1"  style="width:100%" requestURI='<%=request.getContextPath()+"/subprogramas/ActivarSubprogramas.do"%>'>
            <display:column headerClass="headerTable" title="Beneficio" class="Numero" sortable="true">
                <bean:write name="subpro" property="nombre"/> 
            </display:column>  
            <display:column headerClass="headerTable" title="Programa al que pertenece" class="Numero" sortable="true">
                <bean:write name="subpro" property="nombrePrograma"/> 
            </display:column> 
         
            <bean:define id="Codigo" name="subpro" property="code"></bean:define>
            <display:column headerClass="headerTable" title="Activar" class="Numero" sortable="false">
            <input type="checkbox" onclick="fboton()" name="Activar<%=i%>" value="<%=Codigo%>"/>
            <%i++;
            cont++;%>  
            </display:column>
            </display:table>
             <input type="HIDDEN" name="cont" value="<%=cont%>">
            </logic:present>
            </td>
            </tr>
        </table>
        <table cellspacing="2" cellpadding="1" border="0" width="80%" align="center">
            <tr>
            <td>
            <DIV align="center">
            <logic:notPresent scope="request" name="subprogramas">
              <input type="submit" name="activar" value="Activar" disabled="disabled"/>
            </logic:notPresent>
            <logic:present scope="request" name="subprogramas">
                <input type="submit" name="activar" value="Activar" disabled="disabled"/>
            </logic:present>
            </DIV>
            </td>
            </tr>
        </table>
        <table cellspacing="1" cellpadding="2" border="0" width="80%" align="center">
         <tr>
         <td>
            <a href="<%=request.getContextPath() + "/subprogramas/ConsultarSubprograma.do"%>">
            <div align="center"><img src="<%= request.getContextPath() + "/images/BACK1-1.gif" %>" width="16" height="16" border="0"></div>
            </a> 
         </td>
         </tr>
        </table>
        <P></P>
        <P><%
            if(session.getAttribute("mensajes") != null){
              out.println((String)session.getAttribute("mensajes"));
            }
              session.removeAttribute("mensajes");
        %>
        </P>
        <P align="center"></P>
        <P align="center">
        </P>
    </form>
        <P align="center"></P>
  </body>
</html>
